package org.example.controller;

import org.example.service.IElasticSearchService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("elastic")
public class ElasticSearchController {
    @Resource
    private IElasticSearchService elasticSearchService;

    @RequestMapping("search")
    public String search(String text) {
        elasticSearchService.search(text);
        return "success";
    }
}
